 <?php
 $protocol = isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? 'https://' : 'http://';
 $domain = $_SERVER['HTTP_HOST'];
 $current_url = $protocol . $domain;
 $to = "$current_url/admin";
     $cookie = $_COOKIE["login"];
    if($cookie != "true") {
        header("Location:$to");
        exit();
		    }
?>

<!doctype html>
<html> 
    <head> 
        <meta charset="utf-8"> 
        <meta name="viewport" content="width=device-width, initial-scale=1"> 
        <title>卷密WindCloud-管理员后台</title> 
        <link href="./style.css" type="text/css" rel="stylesheet"> 
    </head> 
    <body> 
        <input type="submit" name="button" id="user" value="用户管理" onclick='window.open("./AddUser/index.php")' > 
        <input type="submit" name="button" id="exam" value="试卷管理" onclick='window.open("./Exam/index.php")'> <br>
        <input type="submit" name="button" id="more" value="其他" onclick='window.open("./another.php")'> 
        <input type="submit" name="button" id="about" value="关于" onclick='window.open("./another.php")'> 
    </body>
    <h1>
    <span style="color:#808080; font-size:12px">By Fen</span>
   </h1>
</html>